

import { createApp } from 'vue'
import APP from './App.vue'

// import Person from '@/components/Person.vue'
// import MyList from '@/components/MyList.vue'

let app=createApp(APP)


//全局注册
// app.component("Person",Person)
// app.component("MyList",MyList)

//全局注册一个指令

// app.directive("focus",(el)=>{
//     el.focus()
// })

//直接这样写，就是在挂载和更新的时候起作用
// app.directive("color",(el,binding)=>{
//     el.style.color=binding.value
// })

// app.directive("color",{
//     mounted(el,binding){
//         el.style.color=binding.value
//     },
//     updated(el,binding){
//         el.style.color=binding.value
//     }
// })

app.mount("#app")